Skip to content

CI: the registry follows the pins (ctest registry_pins); bump workflows regenerate it - #165

Merged
bong-water-water-bong merged 2 commits into
mainfrom
registry-pin-check
Sep 26, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
registry-pin-check

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Implements RFC https://github.com/orgs/1bit-MONSTER/discussions/164. Draft until it is accepted.

  • tools/registry_build.py --check-pins compares the pins registry/architectures.json records with the committed gitlinks, with no checkouts. It runs as ctest registry_pins.
  • scripts/registry-regen.sh fetches llama.cpp, llama.cpp-vulkan and zinc at their pins (depth 1), regenerates the registry and amends HEAD. bump-zinc.yml, bump-llama-vulkan.yml and bump-hrx.yml run it after committing the new pin.
  • docs/registry.md: a dated snapshot plus a pointer to the JSON for current counts, instead of naming pins.
  • CONTRIBUTING.md: one line in Automation.

Checked:

  • --check-pins passes on main and fails at 8a82fce1c (Bump ZINC: zolotukhin/zinc 29bc350ac4cb #132), with zinc recorded at 3a35e76d6, pinned at 29bc350ac.
  • The script, run on a worktree at that commit, amends it with the regenerated registry. The counts are unchanged, and the check then passes.
  • The three workflow files still parse, and copyright.py --check passes.

🤖 Generated with Claude Code

…ws regenerate it

registry_build.py --check-pins compares the pins registry/architectures.json
records with the committed gitlinks (no checkouts). scripts/registry-regen.sh
fetches the three trees at their pins, regenerates and amends; bump-zinc,
bump-llama-vulkan and bump-hrx run it after committing a pin. #132 and #161
moved pins without it. RFC: discussion #164.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@context7

context7 Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Docs7 for 1bit-monster/engine

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit 2c5e10c

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 2c5e10c)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

132 - Partially compliant

Compliant requirements:

  • Moves third_party/zinc from commit 3a35e76d64eb to upstream main commit 29bc350ac4cb
  • Update documentation to reflect the new zinc commit
  • Ensure that the bump workflows regenerate the registry

Non-compliant requirements:

  • Run CI test registry_pins to ensure the registry follows the pins (this is implemented via ctest registry_pins but the PR description does not explicitly confirm it was tested on Strix Halo)

Requires further human verification:

  • Confirm that CI test registry_pins passes on Strix Halo with the new zinc commit
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Pin verification logic

The new --check-pins functionality in tools/registry_build.py verifies that the recorded pins in registry/architectures.json match the committed gitlinks. However, the logic only checks the last 9 characters of the git commit hashes, which could lead to false negatives if two different commits share the same first 9 characters (hash collision). This is a low-probability issue but could cause CI to fail incorrectly.

recorded = json.load(open(a.out))["sources"]
stale = [(name, recorded.get(name, ""), pin(path)) for name, path in
         (("llama.cpp (vulkan)", UPSTREAM), ("llama.cpp (hrx)", HRX), ("zinc", ZINC))
         if recorded.get(name) != pin(path)]
for name, old, new in stale:
    print(f"{a.out}: {name} recorded at {old[:9] or 'nothing'}, pinned at {new[:9]}")
if stale:
    print("a pin moved without regenerating the registry: check out the submodules at their "
          "pins (git submodule update --init) and run tools/registry_build.py")
    return 1
print(f"{a.out} records the committed pins")
return 0
Potential race condition in registry regeneration

The script scripts/registry-regen.sh fetches submodules at their pinned commits and then regenerates the registry. If the submodule update fails or if there are any issues with the pinned commits, the script could proceed with an inconsistent state. The script does not explicitly check if the submodule updates were successful before proceeding with registry generation.

for s in third_party/llama.cpp third_party/llama.cpp-vulkan third_party/zinc; do
  git submodule update --init --depth 1 -- "$s"
done
python3 tools/registry_build.py
if ! git diff --quiet -- registry/architectures.json; then
  git add registry/architectures.json
  git commit -q --amend --no-edit
fi
python3 tools/registry_build.py --check-pins

@bong-water-water-bong
bong-water-water-bong marked this pull request as ready for review September 26, 2026 19:20
@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) September 26, 2026 19:20
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 2c5e10c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant